-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Bug Report: When trying to resend email in Organization tab it throws AppwriteException #5901
Comments
On the backend, the endpoint controller tries to create a whole new membership, which is expected from it: appwrite/app/controllers/api/teams.php Lines 525 to 535 in 06570a0
Considering the fact that the email delivery is in the same endpoint, can't we do something like:
Looking at the console API calls, this endpoint would be called only when a brand new membership is being created and when trying to resend an email, so this should be a viable fix. What do you think? Edit: I would love to work on this issue 馃榿 |
I've seen the code and it seems like letting the code keep running on catching a Changed the code from this: try {
$membership = Authorization::skip(fn() => $dbForProject->createDocument('memberships', $membership));
} catch (Duplicate $th) {
throw new Exception(Exception::TEAM_INVITE_ALREADY_EXISTS);
} to this: try {
$membership = Authorization::skip(fn() => $dbForProject->createDocument('memberships', $membership));
} catch (Duplicate $th) {
null;
} catch (Exception $th) {
throw new Exception($th->getMessage());
} I haven't been able to generate a case where an error actually gets thrown, so would appreciate feedback on the above approach! |
馃憻 Reproduction steps
Try to hit resend on an unclaimed email invite
馃憤 Expected behavior
resend the email
馃憥 Actual Behavior
Appwrite Exception
馃幉 Appwrite version
Version 1.3.x
馃捇 Operating system
Linux
馃П Your Environment
1.3.8, Cloudflare, Appwrite is self hosted as a reverse proxy using Nginx
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: